<template>
  <view class="box">
    <!-- <quan v-if="true" /> -->

   <view>
    <view style="height: 150rpx"></view>
   

 <view >
  <uni-card >

    <view style=" font-size: 32rpx; color: #000;font-weight: 700;">基础服务</view>

<view style=" display: flex; margin-top:40rpx">
<view @click="shenf" class="bss">
  
<image class="inf"
  src="../../static/售后.png"
  mode="scaleToFill"
/>
<text class="tli">申请售后</text>
</view>
<view class="bss" @click="shenfs">
  
  <image class="inf"
    src="../../static/售后进度.png"
    mode="scaleToFill"
  />
  <text class="tli">售后进度</text>
  </view>
 
  <view v-if="getquan()" class="bss" @click="shouua">
  
  <image class="inf"
    src="../../static/售后处理.png"
    mode="scaleToFill"
  />
  <text class="tli">售后处理</text>
  </view>
</view>
  </uni-card>

  <uni-card >

<view style=" font-size: 32rpx; color: #000;font-weight: 700;">自助查询</view>

<view style=" display: flex; margin-top:40rpx">
<view @click="dsdss" class="bss">

<image class="inf"
src="../../static/icon_售后地址管理.png"
mode="scaleToFill"
/>
<text class="tli">公司地址</text>
</view>
<view class="bss">

<image class="inf"
src="../../static/保修索赔_保修政策.png"
mode="scaleToFill"
/>
<text class="tli">保修政策</text>
</view>
<view class="bss">

<image class="inf"
src="../../static/产品资料.png"
mode="scaleToFill"
/>
<text class="tli">产品资料</text>
</view>
</view>
</uni-card>



<uni-card >

<view style=" font-size: 32rpx; color:
 #000;font-weight: 700;">联系我们</view>
<view class="bsss">
<view class="edf">
  <image class="sd"
    src="../../static/image/服务 (1).png"
    mode="scaleToFill"
  />
  <text class="sds">联系微信 </text>
</view>

<view @click="fuzhi" class="sdsssds">
  <text class="ttter">SanHe6688SH</text>
  <uni-icons type="right" size="14"></uni-icons>
</view>
</view>
<view style="height: 1rpx; background-color: #f1f1f1;"></view>

<view @click="dianhua" class="bsss sdsasddff">
<view class="edf">
  <image class="sd"
    src="../../static/image/服务 (1).png"
    mode="scaleToFill"
  />
  <text class="sds">服务热线</text>
</view>

<view class="sdsssds">
  <text class="ttter">400-068-0029</text>
  <uni-icons type="right" size="14"></uni-icons>
</view>
</view>

</uni-card>

 </view>



   <!-- 柱状图 -->


   </view>
  </view>
</template>

<script setup lang="ts">
 import uniCopy from '@/js_sdk/xb-copy/uni-copy.js'

import {
    onLoad,
    onShow,onHide
  } from "@dcloudio/uni-app";
import { useCounterStore } from "../../stores/counter";
import {
  ref,
  onMounted,
  inject,
  getCurrentInstance,
  reactive,
  computed,
} from "vue";

const fuzhi=()=>{
  uniCopy({
                content:'SanHe6688SH'
,
                success:(res)=>{
                    uni.showToast({
                        title: res,
                        icon: 'none'
                    })
                },
                error:(e)=>{
                    uni.showToast({
                        title: e,
                        icon: 'none',
                        duration:3000,
                    })
                }
            })
}

const counter = useCounterStore();
// 一个计算属性 ref
const token = computed(() => {
  return counter.token;
});
const quankong=ref(false)
const quanxian = computed(() => {
  return counter.quanxian;
});
const dsdss=()=>{
  uni.navigateTo({
      url: `/subpkg/shoudizhi/index`,

    });
}

const getquan=()=>{

  // quanxian
console.log('出发了');

  
 return ['18998497443','18676888171','13246182715','19970989310','19832841370','13255929517']
  .includes(counter.quanxian)
}
const shenf=()=>{
  if (!token.value) {
    uni.switchTab({
						url: "/pages/my/index",
					  });
    // uni.hideTabBar();
  }else{
    uni.navigateTo({
      url: `/subpkg/shouhou/index`,

    });
  }
}

const shenfs=()=>{
  if (!token.value) {
    uni.switchTab({
						url: "/pages/my/index",
					  });
    // uni.hideTabBar();
  }else{
    uni.navigateTo({
      url: `/subpkg/jindu/index`,

    });
  }
}

const dianhua=()=>{
  uni.makePhoneCall({
	phoneNumber: '400-068-0029' //仅为示例
});
 }
const shouua=()=>{
  uni.requestSubscribeMessage({
  tmplIds: ['mcLjURoNszux9TGYvvLQd6KSsnQmfrEdWZLNarzuse8'
  ,],
  success (res) {
console.log(111);

  uni.navigateTo({
      url: `/subpkg/chuli/index`,

    });
    
   },
   fail(err){
    console.log(err);
    
   },
complete(){

}
})

  // uni.getSetting({
  //   success(res:any) {
   

  //     if (!res.authSetting["scope.userLocation"]) {
  //       uni.authorize({
  //         scope: "scope.userLocation",
  //         success() {
        
  //           uni.chooseLocation({
  //             success: function (res) {

  //               if (res.name) {
               
  //           //  valiFormData.position = res.address ;
  //           //  valiFormData.address=res

  //           }
  //             },
  //           });
        
  //         },
  //         fail() {
  //           uni.showModal({
  //             title: "提示",
  //             content: "您未授权地理位置功能",
  //             cancelText: "不授权",
  //             cancelColor: "#999",
  //             confirmText: "授权",
  //             confirmColor: "#3280fe",
  //             success(res) {
  //               if (res.confirm) {
  //                 // 选择弹框内授权
  //                 uni.openSetting({
  //                   success(res) {
  //                   },
  //                 });
  //               } else if (res.cancel) {
  //                 // 选择弹框内 不授权
  //                 console.log("用户点击不授权");
  //               }
  //             },
  //           });
  //         },
  //       });
  //     } else {
      
  //       uni.chooseLocation({
  //         success: function (res) {

  //           if (res.name) {

  //           }
  //         },
  //       });
  //     }
  //   },
  // });

}


onShow(async ()=>{

  // quankong.value= getquan()
 
})


</script>

<style scoped lang="scss">

.bsss{
display: flex;
justify-content:space-between;
align-items: center;
  margin:40rpx 0;
.sd{width: 50rpx;
height: 50rpx;

margin-right: 10rpx;}

.edf{display: flex;
align-items: center;
.sds{color: #000;
  font-weight: 700;
font-size: 28rpx;}
}
.sdsssds{
  height: 24rpx;
  display: flex;
  align-items: center;

  justify-content: center;
  .ttter{font-size: 24rpx;
    color: #999;
  margin-right: 10rpx;
  }
}
}

.bss{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: column;
  height: 140rpx;
  margin-right: 40rpx;
  .tli{
   
    font-size: 24rpx;
    font-weight: 700;
    color: #000;
  }
  .inf{
width: 80rpx;height: 80rpx;
  }
}
.mosh{
  font-size:26rpx
}
.xuabn {
  width: 70vw;
  height: 80rpx;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: 32rpx;
  align-items: center;
  padding: 0 10rpx;
  margin: 40rpx auto;
  border-radius: 80rpx;
  background: $uni-primary;
  .xu {
    width: 33%;
    text-align: center;
    height: 70rpx;
    border-radius: 70rpx;
    font-weight: 700;
    line-height: 70rpx;
  }
  .sd {
    background: #fff;
    color: #000;
  }
}
.uni-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.boxc {
  font-family: SimSun;
  margin-top: 20rpx;
  font-weight: 700;
  width: 48%;
  padding: 20rpx;
  box-sizing: border-box;
  height: 300rpx;
  justify-content: space-between;
  display: flex;
  flex-direction: column;

  border-radius: 20rpx;
  box-shadow: 0 1px 10px 1px rgba(0, 0, 0, 0.2);
  .di {
    display: flex;
    // align-items: center;
    justify-content: space-between;

    .yuan {
      width: 20rpx;
      height: 20rpx;
      border-radius: 50%;
      background-color: #00b05d;
    }
  }
  .img {
    width: 48rpx;
    height: 48rpx;
  }
}
.tt {
  padding: 0 30rpx;
}
.bacc {
  background: linear-gradient(to bottom, #3280fe, #fefefe, #fefefe, #fefefe);
}
::v-deep .selected-area {
  color: #000 !important;
}
::v-deep .input-value-border {
  border: 0;
}
::v-deep .input-split-line {
  color: #000;
}
.xiao {
  display: flex;
  align-items: center;

  color: #999;
}
.selected {
  height: 30px;
  display: flex;
  align-items: center;
  font-size: 18px;
  color: #fff;
}
.content {
  border: 0;
}
.xuanz {
  width: 600rpx;
  border-radius: 10rpx;
  padding: 30rpx;
  background-color: #fff;
  .btn {
    width: 200rpx;
  }
  .zhn {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30rpx;
    .biaoshi {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 200rpx;
      height: 200rpx;
      color: #fff;
      font-size: 14px;
      border-radius: 50%;
      background-color: #3280fe;
    }
  }
}
.yinas {
  width: 80rpx;
  height: 80rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff !important;
  border-radius: 50%;
  background: #3280fe;
}
.box {
  height: 50vh;
  background: linear-gradient(
    180deg,
    $uni-primary 0%,
    rgba(216, 237, 232, 0.43) 61.6%,
    rgba(217, 217, 217, 0) 100%
  );
}

.san {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 150px;
  flex-direction: column;
  text {
    font-size: 14px;
    color: #adacac;
  }
  image {
    width: 40px;
    height: 30px;
  }
}
.wang {
  margin-top: 30rpx;
  display: flex;
  justify-content: space-between;
  width: 100%;

  font-size: 28rpx;
  color: #b4b3b3;
}
.my-userinfo-container {
  height: 100%;
  background-color: #f4f4f4;

  .top-box {
    height: 400rpx;
    background-color: #029d94;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    .avatar {
      display: block;
      width: 90px;
      height: 90px;
      border-radius: 45px;
      border: 2px solid white;
      box-shadow: 0 1px 5px black;
    }
    button {
      padding: 0;
      border-radius: 45px;
    }
    .nickname {
      color: white;
      font-weight: bold;
      font-size: 16px;
      margin-top: 10px;
    }
  }
}

input {
  text-align: center;
}
.panel-list {
  padding: 0 10px;
  position: relative;
  top: -10px;

  .panel {
    background-color: white;
    border-radius: 3px;
    margin-bottom: 8px;

    .panel-body {
      display: flex;
      justify-content: space-around;

      .panel-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        font-size: 13px;
        padding: 10px 0;
      }
    }
  }
}
.panel-list {
  padding: 0 10px;
  position: relative;
  top: -10px;

  .panel {
    background-color: white;
    border-radius: 3px;
    margin-bottom: 8px;

    .panel-title {
      line-height: 45px;
      padding-left: 10px;
      font-size: 15px;
      border-bottom: 1px solid #f4f4f4;
    }

    .panel-body {
      display: flex;
      justify-content: space-around;

      .panel-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        font-size: 13px;
        padding: 10px 0;

        .icon {
          width: 35px;
          height: 35px;
        }
      }
    }
  }
}
.panel-list-item {
  height: 45px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  padding: 0 10px;
}
.avatar {
  width: 60px;
  height: 60px;
}
.avatar {
  display: block;
  width: 90px;
  height: 90px;
  border-radius: 45px;
  border: 2px solid white;
  box-shadow: 0 1px 5px black;
}
button {
  padding: 0;
  border-radius: 45px;
}
.top-box {
  height: 400rpx;
  background-color: #029d94;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
:deep(.weui-input) {
  font-weight: bold;
  font-size: 16px;
  margin-top: 10px;
  text-align: center;
  color: white !important;
}
.weui-input::placeholder {
  color: white !important;
}
.nickname {
  color: white !important;
}

.box_b {
  padding: 20px;
  .title {
    font-size: 26px;
    font-weight: 700;
    line-height: 30px;
  }
}
.btn-login {
  width: 90%;
  background-color: #029d94;
  color: #f4f4f4;
}
.insd {
  color: #f4f4f4;
}


::v-deep .uni-card{border-radius: 20rpx;}
</style>
